home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_c
/
cuj0696.zip
/
DWYER.ZIP
/
SPECTRAL.TST
/
PRTSPDAT.CX
< prev
next >
Wrap
Text File
|
1996-03-10
|
1KB
|
45 lines
/* ============ */
/* prtspdat.cx */
/* ============ */
#include <stdio.h>
#include <xtendefs.h>
/* ==================================================================== */
/* PrintSpectralData - Prints Results of Dimension N Spectral Analysis */
/* ==================================================================== */
void
PrintSprectalData(USHORT * XS, USHORT * XMerit, short N)
{
static
USHORT MustInit = TRUE;
static
USHORT OneHndrth[NE];
USHORT Tmp1[NE];
if (MustInit)
{
ASCTOX("0.01", OneHndrth); /* Build 0.01 */
MustInit = FALSE;
}
printf("%2d-Dimensional Accuracy = ", N);
PutXInt(XS, 21); /* Fld Width is 21 */
printf(" No. Bits: ");
XLOG(XS, Tmp1); /* ln(XS) / ln(2) = lg(XS) */
XRDIV(Tmp1, ELOG2);
XRMULT(Tmp1, EHALF); /* Yields lg(XS^.5) */
PutXFrac(Tmp1, 1, 0); /* Puts xx.x */
printf("\n");
printf("%2d-Dimensional Merit = ", N);
if (XGTE(XMerit, OneHndrth))
{
PutXFrac(XMerit, 2, 21);
}
else
{
PutXFlt(XMerit, 2, 21);
}
printf(" (Good > 0.1, Great > 1.0)\n");
}